-- GENERATED SPELL FOR [Gadgetzan Sniper] --


function spell0_21448(pUnit, Event) --@Net,n/a--
pUnit:FullCastSpellOnTarget(12024,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21448', 5260, 1)
end

function spell1_21448(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(22121,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21448', 621, 1)
end

function Sorts_21448(pUnit, Event)
local choix_sorts_21448 = math.random(0, 1)
if choix_sorts_21448 == 0 then
pUnit:RegisterEvent('spell0_21448', 1, 1)
end
if choix_sorts_21448 == 1 then
pUnit:RegisterEvent('spell1_21448', 1, 1)
end
end

function mob21448_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21448', math.random(1500, 3000), 1)
end

function mob21448_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21448_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21448_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21448, 1, 'mob21448_Action')
RegisterUnitEvent(21448, 2, 'mob21448_Leave')
RegisterUnitEvent(21448, 3, 'mob21448_Kill')
RegisterUnitEvent(21448, 4, 'mob21448_Die')
